package com.bz.xtcx.manager.mapper;

import com.bz.xtcx.manager.entity.CmsExchangesEnroll;
import com.bz.xtcx.manager.mapper.provider.CmsExchangesEnrollProvider;
import com.bz.xtcx.manager.persist.conditions.ExchangeEnrollCondition;
import org.apache.ibatis.annotations.*;
import org.apache.ibatis.mapping.StatementType;

import java.util.List;

public interface CmsExchangesEnrollMapper {

    @InsertProvider(type = CmsExchangesEnrollProvider.class, method = "insertSelectiveProvider")
    @SelectKey(before = true, keyProperty = "id", resultType = String.class, statementType = StatementType.STATEMENT, statement="select uuid()")
    int insertSelective(CmsExchangesEnroll record);

    @SelectProvider(type = CmsExchangesEnrollProvider.class, method = "countByConditionProvider")
    int countByCondition(ExchangeEnrollCondition eec);

    @SelectProvider(type = CmsExchangesEnrollProvider.class, method = "selectByConditionProvider")
    @Results(
            id = "cmsExchangesEnrollRow",
            value = {
                    @Result(property = "id", column = "id"),
                    @Result(property = "exchangesId", column = "exchanges_id"),
                    @Result(property = "userId", column = "user_id"),
                    @Result(property = "name", column = "name"),
                    @Result(property = "workplace", column = "workplace"),
                    @Result(property = "job", column = "job"),
                    @Result(property = "phone", column = "phone"),
                    @Result(property = "email", column = "email"),
                    @Result(property = "addr", column = "addr"),
                    @Result(property = "memo", column = "memo"),
                    @Result(property = "enrollDate", column = "enroll_date")
            }
    )
    List<CmsExchangesEnroll> selectByCondition(ExchangeEnrollCondition eec);

    @SelectProvider(type = CmsExchangesEnrollProvider.class, method = "selectByPrimaryKeyProvider")
    @ResultMap(value = "cmsExchangesEnrollRow")
    CmsExchangesEnroll selectByPrimaryKey(String id);

//    int countByExample(CmsExchangesEnrollExample example);
//
//    int deleteByExample(CmsExchangesEnrollExample example);
//
//    int deleteByPrimaryKey(String id);
//
//    int insert(CmsExchangesEnroll record);
//
//    List<CmsExchangesEnroll> selectByExampleWithBLOBs(CmsExchangesEnrollExample example);
//
//    int updateByExampleSelective(@Param("record") CmsExchangesEnroll record, @Param("example") CmsExchangesEnrollExample example);
//
//    int updateByExampleWithBLOBs(@Param("record") CmsExchangesEnroll record, @Param("example") CmsExchangesEnrollExample example);
//
//    int updateByExample(@Param("record") CmsExchangesEnroll record, @Param("example") CmsExchangesEnrollExample example);
//
//    int updateByPrimaryKeySelective(CmsExchangesEnroll record);
//
//    int updateByPrimaryKeyWithBLOBs(CmsExchangesEnroll record);
//
//    int updateByPrimaryKey(CmsExchangesEnroll record);
}